<me:UIWBBST x:Class="WPFExcelReport.TWBBPRN"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:BW="clr-namespace:WPFExcelReport;assembly=TWBBEW" 
                    xmlns:WB="clr-namespace:WPFExcelReport;assembly=TWBDAT" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    x:Name="TV"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <me:UIWBBST.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:KM2YD  x:Key="KM2YD"/>
        <ucd:M2YD  x:Key="M2YD"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:PNumConverter  x:Key="pnum"/>
    </me:UIWBBST.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel  Margin="10,0,0,0" VerticalAlignment="Top" >
                <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=机台:}}"></TextBlock>
                    <ex:TXT72 MaxLength="2" Grid.Column="1" FontSize="18" PRE="00"  Foreground="Red"   Text= "{Binding WBEWMPOS,ElementName=TV}" Width="40" />
                </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=流水:}}"></TextBlock>
                    <ex:NumericBox  Grid.Column="1" FontSize="18"   Foreground="Red"   Text= "{Binding WBEWBELEG,ElementName=TV}" Width="100" />
                </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="QueryCommand" Height="40" Margin="5,0,0,0" Width="40" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                        </Button.Background>
                    </Button>
                </Grid>
            </WrapPanel>
            <StackPanel Visibility="{Binding IsEditor, Converter={StaticResource ResourceKey=bv}}" Margin="10,0,0,0" VerticalAlignment="Top">
                <WrapPanel  >
                    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock   Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=小卷号:}}"></TextBlock>
                        <ex:TXT72 MaxLength="4" Grid.Column="1" FontSize="18" PRE="0000"  Foreground="Red"   Text= "{Binding WBBPACKNR, Converter={StaticResource pnum},Source={StaticResource vwMaster}}" Width="50" />
                    </Grid>
                    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock   Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=卷号:}}"></TextBlock>
                        <TextBlock   Grid.Column="1" FontSize="18"  Foreground="Red"  Text= "{Binding WBBSTKNR, Converter={StaticResource pnum},Source={StaticResource vwMaster}}" Width="160" />
                    </Grid>

               

                    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock   Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=长度M:}}"></TextBlock>
                        <TextBlock   Grid.Column="1" FontSize="18"   Text="{Binding Path=WBBISTKLG,Converter={StaticResource d1000},Source={StaticResource vwMaster}}"  Width="40" />

                    </Grid>
                    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock   Grid.Column="0" FontSize="18" Text="{Binding Source={Localization:Translate Word=长度YD:}}"></TextBlock>
                        <TextBlock   Grid.Column="1" FontSize="18" Text="{Binding Path=WBBISTKLG,Converter={StaticResource KM2YD},Source={StaticResource vwMaster}}"   Width="40" />

                    </Grid>
                    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Button   Click="QueryCommand" Height="40" Margin="5,0,0,0" Width="40" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                            </Button.Background>
                        </Button>
                    </Grid>
                    <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Button   Click="PrintCommand" Height="40" Margin="5,0,0,0" Width="40" >
                            <Button.Background>
                                <ImageBrush  ImageSource="/ImagePackage;component/Images/Print.png" />
                            </Button.Background>
                        </Button> 
                    </Grid>
                </WrapPanel>
            </StackPanel>
        </StackPanel>
    </Grid>
</me:UIWBBST>
